#pragma once
#include "DXG.h"

class DXCamera
{
public:
	D3DXVECTOR3 m_vecPos;
	D3DXVECTOR3 m_vecLookAt;
	D3DXVECTOR3 m_vecUp;
	D3DXMATRIX  m_matView;

	DXCamera(void)
	{
		SetPos(0.0f, 175.0f, -175.0f);
		SetLookAt(0.0f, 0.0f, 0.0f);
		SetUp(0.0f, 1.0f, 0.0f);
	}

	virtual ~DXCamera(void)
	{
	}

	void SetPos(float x, float y, float z)
	{
		m_vecPos.x = x;
		m_vecPos.y = y;
		m_vecPos.z = z;
	}

	void SetLookAt(float x, float y, float z)
	{
		m_vecLookAt.x = x;
		m_vecLookAt.y = y;
		m_vecLookAt.z = z;
	}

	void SetUp(float x, float y, float z)
	{
		m_vecUp.x = x;
		m_vecUp.y = y;
		m_vecUp.z = z;
	}

	D3DXMATRIX* GetView(D3DXMATRIX* pOut = NULL)
	{
		if (!pOut) pOut = &m_matView;
		return D3DXMatrixLookAtLH(pOut, &m_vecPos, &m_vecLookAt, &m_vecUp);
	}
};
